home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PAS_0793
/
DTEGAVGA.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-08-01
|
2KB
|
47 lines
{─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
Msg : 85 of 109
From : Jon Taylor 1:363/640.0 29 Jun 93 20:17
To : John Dailey 1:374/38.0
Subj : VGA Info
────────────────────────────────────────────────────────────────────────────────
* In a message originally to All, John Dailey said:
> I'm looking for a quick-and-dirty way of checking to see if a
> user has VGA capability in text mode. ie. 50 line mode. Any
> help is appreciated.}
Function CRTIsVGA : BOOLEAN;
Var
R : REGISTERS;
BEGIN
R.AX := $1A00;
R.DS := $0;
R.ES := $0; Intr( $10, R );
CRTIsVGA := (R.AL=$1A) and ((R.BL=7) or (R.BL=8));
END;
.
Function CanEGA : BOLLEAN; Var
R : REGISTERS;
BEGIN
R.AH := $12;
R.BL := $10;
R.ES := $0;
R.DS := $0;
Intr( $10,R );
CRTisEGA := (R.BL<>$10);
END; .
Function NumRows : BYTE;
BEGIN
If Mem[ Seg0040:$84 ]>25 Then
NumRows := Mem[ Seg0040:$84 ]
Else
NumRows := 25;
END;
If you aren't using BP/TP 7.0 then replace the Seg0040 above with $40.
The first function will tell you if the users PRIMARY video card is a VGA. The
second function will tell you if the user has a card that is capable of EGA.
The card may not be the primary card, and the card may actually be VGA.
The third function will tell you how many rows the screen is currently setup
for.